package com.gserver.game.domain;

import java.util.Map;

import com.google.common.collect.Maps;
import com.gserver.game.character.Player;

public class OnlinePlayer {

	public static Map<Integer, Player> onlinePlayers = Maps.newConcurrentMap();

	public static Map<Integer, Player> getOnlinePlayers() {
		return onlinePlayers;
	}

	public static void addOnlinePlayer(Player player) {
		onlinePlayers.put(player.getPassportId(), player);
	}

	public static void deleteOnlinePlayer(Player player) {
		onlinePlayers.remove(player);
	}

	public static Player findPlayer(int id) {

		return onlinePlayers.get(id);
	}
}
